package com.ruoyi.generator.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.generator.mapper.FromBuildPageMapper;
import com.ruoyi.generator.domain.FromBuildPage;
import com.ruoyi.generator.service.IFromBuildPageService;

/**
 * 构建页面Service业务层处理
 *
 * @author ZGL
 * @date 2024-12-12
 */
@Service
public class FromBuildPageServiceImpl implements IFromBuildPageService
{
    @Autowired
    private FromBuildPageMapper fromBuildPageMapper;

    /**
     * 查询构建页面
     *
     * @param id 构建页面主键
     * @return 构建页面
     */
    @Override
    public FromBuildPage selectFromBuildPageById(Long id)
    {
        return fromBuildPageMapper.selectFromBuildPageById(id);
    }

    /**
     * 查询构建页面列表
     *
     * @param fromBuildPage 构建页面
     * @return 构建页面
     */
    @Override
    public List<FromBuildPage> selectFromBuildPageList(FromBuildPage fromBuildPage)
    {
        return fromBuildPageMapper.selectFromBuildPageList(fromBuildPage);
    }

    /**
     * 新增构建页面
     *
     * @param fromBuildPage 构建页面
     * @return 结果
     */
    @Override
    public int insertFromBuildPage(FromBuildPage fromBuildPage)
    {
        fromBuildPage.setCreateTime(DateUtils.getNowDate());
        return fromBuildPageMapper.insertFromBuildPage(fromBuildPage);
    }

    /**
     * 修改构建页面
     *
     * @param fromBuildPage 构建页面
     * @return 结果
     */
    @Override
    public int updateFromBuildPage(FromBuildPage fromBuildPage)
    {
        fromBuildPage.setUpdateTime(DateUtils.getNowDate());
        return fromBuildPageMapper.updateFromBuildPage(fromBuildPage);
    }

    /**
     * 批量删除构建页面
     *
     * @param ids 需要删除的构建页面主键
     * @return 结果
     */
    @Override
    public int deleteFromBuildPageByIds(Long[] ids)
    {
        return fromBuildPageMapper.deleteFromBuildPageByIds(ids);
    }

    /**
     * 删除构建页面信息
     *
     * @param id 构建页面主键
     * @return 结果
     */
    @Override
    public int deleteFromBuildPageById(Long id)
    {
        return fromBuildPageMapper.deleteFromBuildPageById(id);
    }
}
